FROM openjdk:16-jdk-alpine3.13
RUN addgroup -S spring && adduser -S spring -G spring
USER spring:spring
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["sh","-c","java ${JAVA_OPTS} ${SPRING_PROFILES_ACTIVE} -jar /app.jar"]